﻿@{
    ViewBag.Title = "UpdateSongPage";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
    
}
<script src="../../Scripts/jquery.validate.js" type="text/javascript"></script>
<link href="../../Styles/Validate/cmxform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
    $(document).ready(function () {
        $("#frm").validate({
            rules: {
                filename: { accept: 'mp3|mp4|wma|wmv|mpeg' },        
                songname: { required: true },
                category: { required: true },
                country: { required: true }
            },
            messages: {
                filename: { accept: 'Chỉ được chọn file có đuôi .mp3, .mp4, .wma, .wmv, .mpeg' },
                songname: { required: 'Chọn bài hát bạn muốn upload' },
                category: { required: 'Bạn chưa chọn thể loại bài hát' },
                country: { required: 'Bạn chưa chọn quốc gia' }

            }
        });
    });
</script>
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
<tr>
	<th rowspan="3" class="sized"><img src="../../Images/AdminImages/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
	<th class="topleft"></th>
	<td id="tbl-border-top">&nbsp;</td>
	<th class="topright"></th>
	<th rowspan="3" class="sized"><img src="../../Images/AdminImages/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
</tr>
<tr>
	<td id="tbl-border-left"></td>
	<td>
	<!--  start content-table-inner -->
	<div id="content-table-inner">
	
	<table border="0" width="100%" cellpadding="0" cellspacing="0">
	<tr valign="top">
	<td>
	
	
		<!--  start step-holder -->
		<div id="step-holder">
            <div class="step-no-off">+</div>
			<div class="step-light-left"><a href="/managesong/NoneActiveSong?pageindex=1">Kiểm duyệt</a></div>
			<div class="step-light-right">&nbsp;</div>
			<div class="step-no-off">+</div>
			<div class="step-light-left"><a href="/managesong/viewallsong?pageindex=1">Xem tất cả</a></div>
			<div class="step-light-right">&nbsp;</div>
			<div class="step-no-off">+</div>
			<div class="step-light-left"><a href="/managesong/uploadSong">Upload bài hát mới</a></div>
			<div class="step-light-right">&nbsp;</div>	
            <div class="step-no">+</div>
			<div class="step-dark-left"><a href="">Cập nhật bài hát</a></div>
			<div class="step-dark-right">&nbsp;</div>			
			<div class="clear"></div>
		</div>
		<!--  end step-holder -->
	
		<!-- start id-form -->   
        <form id="frm" action="/managesong/updateSong" method="post" enctype="multipart/form-data">
		<table border="0" cellpadding="0" cellspacing="0"  id="id-form">		   
        <tr>
			<th valign="top">Tên bài hát:</th>
			<td><input type="text" id="songname" value="@Model.SongName" name="songname" class="inp-form" /></td>
			<td></td>
		</tr>
        <tr>
			<th valign="top">Đường dẫn:</th>
			<td><input type="text" id="songurl" readonly="readonly" value="@Model.SongURL" name="songurl" class="inp-form" /></td>
			<td></td>
		</tr>
        <tr>
			<th valign="top"></th>
			<td><input type="file" id="filename" name="filename" class="" /></td>
			<td></td>
		</tr>
		<tr>
			<th valign="top">Ca sĩ:</th>
			<td><input type="text" id="singername" name="singername" value="@Model.SingerName" class="inp-form" /></td>
			<td>
			@*<div class="error-left"></div>
			<div class="error-inner">This field is required.</div>*@
			</td>
		</tr>
        <tr>
			<th valign="top">Nhạc sĩ:</th>
			<td><input type="text" id="musicianname" value="@Model.MusicianName" name="musicianname" class="inp-form" /></td>
			<td></td>
		</tr>
		<tr>
		<th valign="top">Thể loại:</th>
		<td>	
		<select  class="styledselect_form_1" id="category" name="category">			
			@foreach (ListenMusic.Category_ServiceReference.Category ct in ViewBag.category)
               {
                   if (ct.CategoryID == Model.CategoryID)
                   {
                    <option selected="selected" value="@ct.CategoryID">@ct.CategoryName</option>
                   }
                   else
                   { 
                   <option value="@ct.CategoryID">@ct.CategoryName</option>
                   }
               }
		</select>
		</td>
		<td></td>
		</tr>
		<tr>
		<th valign="top">Quốc gia:</th>
		<td>	
		<select  class="styledselect_form_1" id="country" name="country">			
			@foreach (ListenMusic.Country_ServiceReference.Country ct in ViewBag.country)
               {
                   if (ct.CountryID == Model.CountryID)
                   {
                      <option selected="selected" value="@ct.CountryID">@ct.CountryName</option>
                   }
                   else
                   { 
                    <option value="@ct.CountryID">@ct.CountryName</option>
                   }
               }
               <option value="3">Quốc gia khác</option>
		</select>
		</td>
		<td></td>
		</tr> 		
		<tr>		
		<td></td>
	</tr>
	<tr>
		<th valign="top">Lời bài hát:</th>
		<td><textarea rows="" cols="" name="lyrics" id="lyrics" class="form-textarea">@Model.Lyrics</textarea></td>
		<td></td>
	</tr>
	
	<tr>
		<th>&nbsp;</th>
		<td valign="top">  
            <input type="hidden" value="@Model.SongID" id="sid" name="sid" />        
			<input type="submit" value="" class="form-submit" />
			<input type="reset" value="" class="form-reset"  />
		</td>
		<td></td>
	</tr>
	</table>
    </form>   
	<!-- end id-form  -->

	</td>
	<td>


</td>
</tr>
<tr>
<td><img src="../../Images/AdminImages/shared/blank.gif" width="695" height="1" alt="blank" /></td>
<td></td>
</tr>
</table>
 
<div class="clear"></div>
 

</div>
<!--  end content-table-inner  -->
</td>
<td id="tbl-border-right"></td>
</tr>
<tr>
	<th class="sized bottomleft"></th>
	<td id="tbl-border-bottom">&nbsp;</td>
	<th class="sized bottomright"></th>
</tr>
</table>









 





<div class="clear">&nbsp;</div>
